package com.wanlian.dao;


import com.wanlian.entity.UserAuthority;
import com.wanlian.model.PageResult;
import com.wanlian.vo.Page;

import java.util.List;

public interface UserAuthorityDao
{
    /**
     * 添加
     * @param userAuthority
     */
    void add(UserAuthority userAuthority);

    /**
     * 修改
     * @param userAuthority
     */
    void doedit(UserAuthority userAuthority);

    /**
     * 删除
     * @param id
     */
    void delete(int id);

    /**
     * 根据用户ID删除用户所有权限
     * @param userId
     */
    void deleteByUserId(int userId);

    UserAuthority getUserAuthority(int id);

    /**
     * 根据ID查询该用户的所有权限
     * @param userid
     * @return
     */
    List<UserAuthority> queryUserAuthority(int userid);

    UserAuthority getIsExistUserAuthority(int userid, int authorityid);

    PageResult queryPageList(UserAuthority userAuthority, Page page);

    List<UserAuthority> queryByAuthorityid(int authorityid);
}
